// JavaScript Document
//get CheckCode
function getCheckCode()
{
	var btn = document.getElementById("getCheckCode"),
		tip = document.getElementById("tipbox")
	btn.onclick = null;
	btn.setAttribute("class","off");
	
	tip.setAttribute("class","tipbox on");
	setTimeout(function(){
		tip.setAttribute("class","tipbox");
	},5000);
	
	var i = 6,count;
	btn.innerHTML = i + " 秒重新获取";
	count = setInterval(function(){
		if(i <= 0)
		{
			btn.innerHTML = "获取验证码";
			btn.setAttribute("class","on");
			btn.onclick = function(){getCheckCode();}
			clearInterval(count);
			count = null;
			return;
		}
		else
		{
			i--;
			btn.innerHTML = i + " 秒重新获取";
		}
		
	},1000);
}
